package com.wlyuan.open.dto.api;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * @author lijing
 * @description
 */
@Data
public class OpenApiCreationDTO implements Serializable {
    private static final long serialVersionUID = 3920125090917748161L;
    @NotBlank(message = "接口名称不能为空")
    @Length(max = 50, message = "接口名称最多50个字符")
    @ApiModelProperty(value = "接口名称", required = true)
    private String name;

    @NotBlank(message = "接口地址不能为空")
    @Length(max = 150, message = "接口地址最多150个字符")
    @ApiModelProperty(value = "接口url", required = true)
    private String url;

    @NotBlank(message = "接口请求方式不能为空")
    @Length(max = 30, message = "接口请求方式最多30个字符")
    @ApiModelProperty(value = "接口请求方式", required = true)
    private String method;

    @Length(max = 200, message = "接口描述最多200个字符")
    @ApiModelProperty("接口描述")
    private String remark;

    @ApiModelProperty(value = "用户")
    private String user;

    @ApiModelProperty(value = "租户id")
    private Long tenantId;
}
